﻿<Window x:Class="AppDemo.Window6"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:AppDemo"
        Title="Window6" Height="300" Width="400">
    <Grid>
        <StackPanel Orientation="Horizontal" x:Name="sp">
            <Button Click="Button_Click">xxx</Button>
            <ListBox Width="100" x:Name="box1" Margin="5">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding}" Height="20"></TextBlock>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
           
            <!-- <ListBox Width="100" x:Name="box2" Margin="5"></ListBox>-->
            <Border Margin="5" BorderBrush="Gray" BorderThickness="1">
            <ScrollViewer>
                   
                        <local:VisualListBox x:Name="box3" Width="100">
            </local:VisualListBox>
            </ScrollViewer>
            </Border>
            <Border Margin="5" BorderBrush="Gray" BorderThickness="1">
                <ScrollViewer>

                    <local:VisualListBox x:Name="box2" Width="100">
                    </local:VisualListBox>
                </ScrollViewer>
            </Border>
        </StackPanel>
    </Grid>
</Window>
